const state = {
  token: localStorage.getItem('jikeyuan-token')
}

const mutations = {
  setToken(state, payload) {
    state.token = payload
    localStorage.setItem('jikeyuan-token', payload)
  },
  removeToken(state) {
    state.token = ''
    localStorage.removeItem('jikeyuan-token')
  }
}

const actions = {}

const getters = {}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
